package com.gnerv.rabbitmq.agent.command;

import com.gnerv.rabbitmq.agent.model.entity.Node;
import com.gnerv.rabbitmq.agent.tools.ExecTools;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author Gnerv LiGen
 */
public class ServerCommand extends AbstractRabbitmqServerCommand {

    private ServerCommand(Node node) {
        super();
        setNode(node);
    }

    public static ServerCommand build(Node node) {
        return new ServerCommand(node);
    }

    public ExecTools.ExecResult detached() {
        List<String> listQueues = Lists.newArrayList();
        listQueues.add("-detached");
        return run(listQueues);
    }

}
